<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>	
		<title>临时管理工作安排</title>
		<script type="text/javascript" src="<%=contextPath%>/js/validator.js"></script>
		<script type="text/javascript" src="<%=contextPath%>/js/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript">
			Ext.onReady(function(){
				var tb = new Ext.Toolbar({
			   		renderTo: document.all.tbar,
			    	items: [
				       {
				            text: '保存',
				            icon:"<%=contextPath%>/images/save.gif",
				            handler:function(){
				            	comt();
				            }
				        },'-',
				        {
				            text: '返回',
				            icon:"<%=contextPath%>/images/fanhui.png",
				            handler:function(){
				            	back();
				            }
				        }
			    	]
			    });
			});

		</script>
	</head>
  
  <body topmargin="0">
  <div id = "tbar"></div>
  <center>
			<!-- 信息提示 -->
			<div result><font color="red">${info }</font></div>
		</center>
 		<form id="frmM" class="ct" name="frmM" method="POST" >
 			<input type="hidden" id="hiddenids" name="hiddenids" value="${hiddenids}"/>
			<s:hidden name="entity.id" />	
			<s:hidden name="entity.ouid" />
			<s:hidden name ="entity.dwry"/>	
			<s:hidden name ="entity.ysr"/>	
			<s:hidden name ="entity.fzr"/>	
			<s:hidden name="entity.status" />	
			<s:hidden name="entity.state" />	
			<table width="100%"  id="infotab" >
				<tr>
					<th width="18%" align="left" class="ct"> <font color="red">*</font>&nbsp;开始日期：</th>
					<td width="31%" >
				    	 <s:textfield name="entity.startdate" readonly="true"  datatype="Require" maxlength="50" size="25" msg="开始日期必须输入。" />
				    	 <img onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:$dp.$('entity.startdate')})" src="<%=contextPath%>/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
				     </td>
					<th width="22%" class="ct"></th>
					<td width="29%" ></td>
				</tr>
				<tr>
					<th width="120" nowrap>
						负责人：
					</th>
					<td>
						<input type="text" style="width:50%" readonly="true" name="entity.responsible" value="${entity.responsible}" msg="负责人必须输入。"/>
						<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="" onClick="javascript:getUser('entity.fzr','entity.responsible','entity.bdz')" />
					</td>
					<th width="120" nowrap>
						外用工人数：
					</th>
					<td>
						<input type="text" style="width:50%"  name="entity.wyry" value="${entity.wyry}" msg="外用工人数必须输入。"/>
						</td>
				</tr>
					<tr>
					<th width="120" nowrap>
						验收人：
					</th>
					<td>
						<input type="text" style="width:50%" readonly="true" name="entity.ysrname" value="${entity.ysrname}" msg="验收人必须输入。"/>
						<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="" onClick="javascript:getUser('entity.ysr','entity.ysrname','entity.bdz')" />
					</td>
					<th width="120" nowrap>
						到位人员：
					</th>
					<td>
						
						<input type="text" style="width:50%" readonly="true" name="entity.dwryname" value="${entity.dwryname}" msg="到位人员必须输入。"/>
						<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="" onClick="javascript:getUser('entity.dwry','entity.dwryname','entity.bdz')" />
						
					</td>
				</tr>
				<tr>
					<th align="left" ><font color="red">*</font>&nbsp;工作内容：</th>
					<td colspan="3" >
						<textarea name="entity.gzxm" style="width:99%; height: 30px; min-height: 20px;line-height:15pt" min="0" datatype="LimitB"  min="1"   max="200"  datatype="Require"  msg="工作项目必须输入。" >${entity.gzxm}</textarea></td>
				</tr>
				<tr>
					<th align="left" >备注： </th>  
					<td colspan="3" >
						<textarea name="entity.remarks" style="width:99%; height: 30px; min-height: 20px;line-height:15pt" min="0" datatype="LimitB"  min="0"   max="200"   maxlength="50" size="25"  >${entity.remarks}</textarea></td>
				</tr>
				
			<hr>
			<table width="100%" id="listtab" class = "leadertab" >
				<tr><td colspan="4"> 工作组织 </td></tr>
				<tr>
					<th width="150">班组</th>
					<th width="150">负责人</th>
					<th>成员</th>
					<th>工作任务</th>
				</tr>

				<c:forEach items="${lsapbzList}" var="detail" varStatus="status">
					<tr id='tr${status.index}' class = "repeat">
						<td width="150" >
							<input type="hidden" id="lsapbzList[${status.index}].lsapid" name="lsapbzList[${status.index}].lsapid" value = "${detail.lsapid}"/>
							<input type="hidden" id="lsapbzList[${status.index}].id" name="lsapbzList[${status.index}].id" value = "${detail.id}"/>
							<input type="hidden" id="lsapbzList[${status.index}].delflag" name="lsapbzList[${status.index}].delflag" value = "${detail.delflag}"/>
							<input type="hidden" id="lsapbzList[${status.index}].bzid" name="lsapbzList[${status.index}].bzid" value = "${detail.bzid}"/>
							<input type="text" readonly="true" style="width:90%" id="lsapbzList[${status.index}].bzname" name="lsapbzList[${status.index}].bzname" value = "${detail.bzname}"/>
						</td>
						<td width="150">
							<input type="hidden" id="lsapbzList[${status.index}].fzrid" name="lsapbzList[${status.index}].fzrid" value = "${detail.fzrid}"/>
							<input type="text" readonly="true" style="width:80%" id="lsapbzList[${status.index}].fzrname" name="lsapbzList[${status.index}].fzrname" value = "${detail.fzrname}"/>
							<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="" onClick="javascript:getUser('lsapbzList[${status.index}].fzrid','lsapbzList[${status.index}].fzrname','detail.bzid')" />
						</td>
						<td >
							<input type="hidden" id="lsapbzList[${status.index}].cyid" name="lsapbzList[${status.index}].cyid" value = "${detail.cyid}"/>
							<input type="text" readonly="true" style="width:80%" id="lsapbzList[${status.index}].cyname" name="lsapbzList[${status.index}].cyname" value = "${detail.cyname}"/>
							<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="" onClick="javascript:getUser('lsapbzList[${status.index}].cyid','lsapbzList[${status.index}].cyname','detail.bzid')" />
						</td>
						<td >
							<input type="text"  style="width:80%" id="lsapbzList[${status.index}].gzrw" name="lsapbzList[${status.index}].gzrw" value = "${detail.gzrw}"/>
								</td>
					</tr>
				</c:forEach>
			
			</table>
		</table>
   </form>
  </body>
</html>
<script language="javascript">
	 // 保存
     function comt(){
        if(!Validator.Validate(frmM,1)){
			return false;
		}
     	document.frmM.action = "<%=contextPath%>/lsap!saveLsap.do";
     	document.frmM.submit();
     }
     
     // 返回
     function back() {
        location.href = "<%=contextPath%>/lsapList!getList.do?"
     }
 
</script>
